package common.consts;

/**
 * 百度相关的配置
 */
public interface Baidu {
    /**
     * 百度 Geocoder接口配置
     */
    interface Geocoder {
        /**
         * Geocoder API
         */
        String URL = "http://api.map.baidu.com/geocoder/v2/?";

        interface Param {
            /**
             * 根据坐标查询详细地址的接口参数
             */
            enum Coordinate2Address {
                OUTPUT("output", "json"),
                AK("ak", "MxvN6mlaHsfADkwy0eGjRsBw"),
                //                SN("sn", "#SN"),
                LOCATION("location", "#LAT,#LNG");

                public final String name;
                public final String value;

                Coordinate2Address(String name, String value) {
                    this.name = name;
                    this.value = value;
                }
            }

            /**
             * 根据地址查经纬度接口的参数
             */
            enum Address2Coordinate {
                OUTPUT("output", "json"),
                AK("ak", "MxvN6mlaHsfADkwy0eGjRsBw"),
                ADDRESS("address", "#ADDRESS");

                public final String name;
                public final String value;

                Address2Coordinate(String name, String value) {
                    this.name = name;
                    this.value = value;
                }
            }
        }
    }
}